<?php

namespace modules\point\model;

use modules\admin\model\UserModel;

class PointModel extends \core\AppModel
{
    protected $table = 'point';
    protected $has_one = [
        'user' => [UserModel::class, 'user_id'],
    ];

    public function afterFind(&$data)
    {
        $user = $this->user;
        $name = $user['phone'];
        $data['name'] = $name;
    }
}
